import http from "@/util/request";

const api = "/api/user"

export default {

    user_login(param) {
        return http.post(`${api}/login`, param)
    },

    user_register(param) {
        return http.post(`${api}/register`, param)
    },

    updateUserRole(param) {
        return http.post(`${api}/updateUserRole`, param)
    },

    userList() {
        return http.get(`${api}/list`)
    },

    updatePassword(param) {
        return http.post(`${api}/updatePassword`, param)
    },

    deleteUser(userId) {
        return http.get(`${api}/deleteUser/${userId}`)
    },

    getRecommendationsData(userId) {
        return http.get(`${api}/recommendations/${userId}`)
    },
}
